﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QuanLyKho
{
    public partial class frm_Main : Form
    {
        public frm_Main()
        {
            InitializeComponent();
        }

        private void nhậpXuấtTồnToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void frm_Main_Load(object sender, EventArgs e)
        {
          
            if(frm_DangNhap.flag==false)
            {
                khoachucnang(false);
            }
            else
            {
                khoachucnang(true);
            }
        }

        public void khoachucnang(bool cn)
        {
            
            điềuChỉnhToolStripMenuItem.Enabled = cn;
            //báoCáoToolStripMenuItem.Enabled = cn;
            //kiểmKêToolStripMenuItem.Enabled = cn;
            phiếuNhậpKhoToolStripMenuItem.Enabled = cn;

        }

        private void phiếuNhậpKhoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_NhapHangHoa frm=new frm_NhapHangHoa();
            frm.Show();
        }

        private void điềuChỉnhToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void bToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_DSDieuChinh frm = new frm_DSDieuChinh();
            frm.Show();
        }

        private void aToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_DieuChinh frm = new frm_DieuChinh();
            frm.Show();
        }

        private void phiếuXuấtKhoToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frm_XuatHangHoa frm = new frm_XuatHangHoa();
            frm.Show();
        }

        private void thoátToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void báoCáoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_BaoCao frm = new frm_BaoCao();
            frm.Show();
        }

        private void danhSáchPhiếuXuấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_DSXuat frm = new frm_DSXuat();
            frm.Show();
        }

        private void phiếuXuấtKhoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_DSNhap frm = new frm_DSNhap();
            frm.Show();
        }

        private void phiếuKiểmKêToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_KiemKe frm = new frm_KiemKe();
            frm.Show();
        }

        private void danhSáchPhiếuKiểmKêToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_DSKiemKe frm = new frm_DSKiemKe();
            frm.Show();
        }

        private void dSHàngHóaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_HangHoa frm = new frm_HangHoa();
            frm.Show();
        }

        private void quảnLýNhânViênToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Qlnv frm = new frm_Qlnv();
            frm.Show();
        }

        private void thayĐổiTàiKhoảnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Qltk frm=new frm_Qltk();
            frm.Show();
        }
    }
}
